package com.cxy.services;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.cxy.dao.MilestoneDao;
import com.cxy.pojo.Milestone;


@Service
@Transactional
public class MilestoneServices {
	@Resource
	private MilestoneDao milestoneDao;
	@Transactional(readOnly=true)
	public List<Milestone> find(){
		return milestoneDao.findAll();
	}
	@Transactional(readOnly=true)
	public Milestone get(int id){
		return milestoneDao.findById(id);
	}
	public void saveOrUpdate(Milestone m){
		milestoneDao.saveOrUpdate(m);
	}
	public void del(int id){
		milestoneDao.del(id);
	}
	@Transactional(readOnly=true)
	public List<Milestone> findByPid(String pid){
		return milestoneDao.findByPid(pid);
	}
}
